package systems.events 
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Humberto Anjos
	 */
	public class ShipEvent extends Event 
	{
		public static const SHIP_CREATED = "systems.events.ShipEvent:SHIP_CREATED"
		public static const SHIP_DESTROYED = "systems.events.ShipEvent:SHIP_DESTROYED"
		
		private var _ship:Ship
		
		public function ShipEvent(type:String, ship:Ship, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			_ship = ship
		} 
		
		public override function clone():Event 
		{ 
			return new ShipEvent(type, ship, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("ShipEvent", "type", "ship", "bubbles", "cancelable", "eventPhase"); 
		}
		
		public function get ship():Ship { return _ship }
	}
	
}